﻿namespace EFS.RC.CC.CH.Tables
{
	public static class QuestionareSessionAnswer
	{
		/// Create
		public static System.Int32? Create(
			System.DateTime occurred,
			System.Guid conversationGuid,
			System.Int32 question_id,
			System.Int32 answer_code,
			EFS.DB.Connection connection)
		{
			// check
			EFS.Common.Verify.Reference(connection, "connection");

			// make params
			EFS.DB.Parameters.Array parametersArray = new EFS.DB.Parameters.Array(
				new System.String[] { "occurred", "conversation_guid", "question_id", "answer_code", "id" },
				new System.Object[] { occurred, conversationGuid, question_id, answer_code, default(System.Int32) },
				new System.Boolean[] { false, false, false, false,  true });

			// create
			connection.DoExecuteNonQuery("[dbo].[QuestionareSessionAnswer_Create]", parametersArray);

			// get id value
			return parametersArray.GetOutPrameterValue<System.Int32?>("id");
		}
	}
}